package com.zp.drug.entity.bo;

import com.zp.common.core.entity.BaseEntity;
import com.zp.common.core.validate.AddGroup;
import com.zp.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;


/**
 * 保存库存扣减、stock_log和处方对应业务对象
 *
 * @author zhang peng
 * @ date 2024-06-07
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class GrantStockVsPrescriptionBo extends BaseEntity {

    /**
     * 主键
     */
    @NotBlank(message = "主键不能为空", groups = {EditGroup.class})
    private String grantStockVsId;

    /**
     * 库存id
     */
    @NotBlank(message = "库存id不能为空", groups = {AddGroup.class, EditGroup.class})
    private String stockId;

    /**
     * 分组字段
     */
    @NotBlank(message = "分组字段不能为空", groups = {AddGroup.class, EditGroup.class})
    private String identicalInfoId;

    /**
     * 扣减数量
     */
    @NotNull(message = "扣减数量不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer num;

    /**
     * 处方主记录id
     */
    @NotBlank(message = "处方主记录id不能为空", groups = {AddGroup.class, EditGroup.class})
    private String prescriptionApplyId;

    /**
     * 处方明细id
     */
    private String prescriptionItemId;

    /**
     * 批次号
     */
    private String batchNo;

    /**
     * 库存扣减记录id
     */
    private String drugStockAllLogId;


}
